<template>
  <div class="dropdown-menu">
    <button @click="showMenu = !showMenu">⏷</button>
    <div v-if="showMenu" class="menu">
      <button @click="changePassword">修改密码</button>
      <button @click="logout">退出</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DropdownMenu',
  data() {
    return {
      showMenu: false,
    };
  },
  methods: {
    changePassword() {
      this.$emit('change-password');
    },
    logout() {
      // 实现登出逻辑
    },
  },
};
</script>

<style>
/* 样式代码 */
</style>